C Library Functions
The Standard Function Library in C is a huge library of sub-libraries, each of which contains the code for several functions. In order to make use of these libraries, link each library in the broader library through the use of header files. The definitions of these functions are present in their respective header files. In order to use these functions, we have to include the header file in the program. Below are some header files with descriptions:...
read more
Difference between NULL pointer, Null character (‘\0’) and ‘0’ in C with Examples
NULL Pointer: The integer constant zero(0) has different meanings depending upon it’s used. In all cases, it is an integer constant with the value 0, it is just described in different ways. If any pointer is being compared to 0, then this is a check to see if the pointer is a null pointer. This 0 is then referred to as a null pointer constant. The C standard defines that 0 is typecast to (void *) is both a null pointer and a null pointer constant. The macro NULL is provided in the header file “stddef.h”....
read more
Dynamic Memory Allocation in C using malloc(), calloc(), free() and realloc()
Since C is a structured language, it has some fixed rules for programming. One of them includes changing the size of an array. An array is a collection of items stored at contiguous memory locations....
read more
Is it fine to write void main() or main() in C/C++?
In C/C++ the default return type of the main function is int, i.e. main() will return an integer value by default. The return value of the main tells the status of the execution of the program. The main() function returns 0 after the successful execution of the program otherwise it returns a non-zero value....
read more
Difference between exit() and break in C/C++
In this article, the topic is to understand the difference between exit() and break....
read more
Difference between Java and C language
Here are some of the differences between Java and C language....
read more
Difference between sizeof(int *) and sizeof(int) in C/C++
sizeof()...
read more
Can we write a print statement within if parentheses?
If-Else is a decision-making statement, where the result will be either true or false. If the statement accepts boolean values – if the value is true then it will execute the block of statements below it otherwise not. If no curly braces ‘{‘ and ‘}’ is provides after if(condition) then by default if statement will consider the immediately below statement to be inside its block....
read more
Writing First C++ Program – Hello World Example
C++ is a widely used Object Oriented Programming language and is relatively easy to understand. The “Hello World” program is the first step towards learning any programming language and is also one of the most straightforward programs you will learn....
read more
‘this’ pointer in C++
To understand ‘this’ pointer, it is important to know how objects look at functions and data members of a class....
read more
How to speed up g++ during compile time
Fast compilation on g++ build systems is basically used in compiling and executing C++ programs in the terminal. There are many options to speed up the compilation or even slow it down. Some of them are as follows:...
read more
C Comments
The comments in C are human-readable explanations or notes in the source code of a C program.  A comment makes the program easier to read and understand. These are the statements that are not executed by the compiler or an interpreter....
read more